CentOS 7
Sponsored Link

Func : Basic Operation
2016/09/29
 
Run Commands to Minions on Certmaster Server. Basic usage is like follows.
⇒ func target call module method [args ...]
[1] Show Minions.
# show all

[root@dlp ~]#
func "*" list_minions

dlp.srv.world
node01.srv.world
# specify Minions and show them

[root@dlp ~]#
func "dlp.srv.world;node01.srv.world" list_minions

dlp.srv.world
node01.srv.world
[2] Show all available modules.
# show modules for node01.srv.world

[root@dlp ~]#
func "node01.srv.world" call system list_modules
{'node01.srv.world': ['bridge',
                      'certmastermod',
                      'command',
                      'confmgt_augeas',
                      'copyfile',
                      'cpu',
                      'delegation',
                      'disk',
                      'djangoctl',
                      'echo',
                      'fact',
                      'filetracker',
                      'func_getargs',
                      'func_module',
                      'getfile',
                      'hardware',
                      'httpd',
                      'iptables',
                      'iptables.port',
                      'jboss',
                      'jobs',
                      'mount',
                      'nagios',
                      'nagios_check',
                      'netapp.options',
                      'netapp.snap',
                      'netapp.vol',
                      'netapp.vol.clone',
                      'networktest',
                      'overlord',
                      'portinfo',
                      'process',
                      'pullfile',
                      'reboot',
                      'rpms',
                      'service',
                      'smart',
                      'snmp',
                      'sysctl',
                      'test',
                      'users',
                      'vlan',
                      'yumcmd']}
[3] Show all available methods for a module.
# show methods for "command" module

[root@dlp ~]#
func "node01.srv.world" call command list_methods
{'node01.srv.world': ['run',
                      'config_items',
                      'grep',
                      'exists',
                      'save_config',
                      'module_version',
                      'grep',
                      'list_methods',
                      'module_description',
                      'get_method_args',
                      'module_api_version']}
 
Tweet